<div ng-controller="queryMonitorFormulaController">

    <table class="table table-hover">

        <thead>
        <tr>
            <th>id</th>
            <th>计算公式</th>
            <th>归属文件</th>
            <th>监控名称</th>
            <th>展示字段</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="data in dataList">
            <td>{{data.monitorId}}</td>
            <td>{{data.formula}}</td>
            <td>{{data.fileId}}</td>
            <td>{{data.monitorName}}</td>
            <td>{{data.showField}}</td>
            <td><button ng-click="openModal(data)" type="button" class="btn btn-default">更新</button></td>
        </tr>

        </tbody>
    </table>
    <!-- 模态框（Modal） -->
    <div class="modal fade bs-example-modal-lg" id="updateMonitorFormulaModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-hidden="true">×
                    </button>
                    <h4 class="modal-title" id="myModalLabel">
                        采集文件信息
                    </h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" role="form">
                        <div class="form-group">
                            <label for="monitorName" class="col-sm-2 control-label">监控id</label>
                            <div class="col-sm-8">
                                <input ng-model="chooseRecord.monitorId" type="text" class="form-control" id="monitorId"
                                       placeholder="请输入名字">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="monitorName" class="col-sm-2 control-label">监控名称</label>
                            <div class="col-sm-8">
                                <input ng-model="chooseRecord.monitorName" type="text" class="form-control" id="monitorName"
                                       placeholder="请输入名字">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="fileId" class="col-sm-2 control-label">所属文件</label>
                            <div class="col-sm-8">
                                <input ng-model="chooseRecord.fileId" type="text" class="form-control" id="fileId"
                                       placeholder="请输入名字">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="showField" class="col-sm-2 control-label">展示字段</label>
                            <div class="col-sm-8">
                                <input ng-model="chooseRecord.showField" type="text" class="form-control" id="showField"
                                       placeholder="请输入名字">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="monitorFormula" class="col-sm-2 control-label">计算公式</label>
                            <div class="col-sm-8">
                                <input ng-model="chooseRecord.formula" type="text" class="form-control" id="monitorFormula"
                                       placeholder="请输入名字">
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default"
                            data-dismiss="modal">关闭
                    </button>
                    <button type="button" ng-click="updateMonitorFormula(chooseRecord.monitorId,chooseRecord.fileId,chooseRecord.monitorName,chooseRecord.showField,chooseRecord.formula)" class="btn btn-primary">
                        提交更改
                    </button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
</div>